<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="gwm" uri="http://www.gwm.cn"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--防止倒链标签-->
<gwm:referer></gwm:referer>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>亚马逊 - 订单页</title>
<link href="${pageContext.request.contextPath}/css/index.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/adv.css" rel="stylesheet" type="text/css" />
<link href="${pageContext.request.contextPath}/css/style.css" rel="stylesheet" type="text/css" />
<script src="${pageContext.request.contextPath}/scripts/jquery-2.1.0.js" type="text/javascript"></script>
<script src="${pageContext.request.contextPath}/scripts/adv.js" type="text/javascript"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/function.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/scripts/index.js"></script>
<script type="text/javascript" src="scripts/shopping.js"></script>
<style type="text/css">#oderview{font-size: 14px}</style>

</head>
<body>
<%@ include file="index_top.jsp"  %>
<div id="position" class="wrap">
	您现在的位置：<a href="index.jsp">亚马逊</a> &gt; 查看所有订单
</div>
<div class="wrap">
	<div id="shopping">
		<form action="doBuy" method="post">
			<table id="oderview">
				<tr>
					<th>订单用户名称:${sessionScope.user.hu_user_name}</th>
					<th>订单总数:${pageModel.recordCount}</th> 
					<th>订单总额:${sum}</th>	
					<th><th>				
				</tr>  
				<!-- 根据用户购物车生成列表 -->
			 	 <c:forEach items="${pageModel.recordList }" var="shopping">
					<tr id="product_id_1">
					<td class="thumb"><img style="width: 100px; height: 100px;" src="${shopping.product.hp_file_name }" /><a href="${pageContext.request.contextPath }/PviewServlet?pId=${shopping.product.hp_id }">${shopping.product.hp_name }</a></td>
					<td class="price">
						￥<span >单价：${shopping.product.hp_price }</span>
					</td>
					<td class="number">
							<span>X${shopping.orderDetail.hod_quantity }</span>
					</td>
					<td class="delete">${shopping.ho_create_time}</td>
				</tr>
				</c:forEach>  
			</table>
			
		</form>
			 <div class="pager">
				<ul>
					<ul>
					<c:if test="${pageModel.recordList.size()!=0}">
					<li>
					<span>第${pageModel.currentPage}/${requestScope.pageModel.pageCount}页</span>&nbsp;
					<a href="${pageContext.request.contextPath}/SearchAllOrderServlet?pageNow=${pageModel.currentPage<2?1:pageModel.currentPage-1}" id="lastPage">上一页</a></li>
				    <c:forEach var="pl" begin="1" end="${requestScope.pageModel.pageCount}" varStatus="i">
						<li><a href="${pageContext.request.contextPath}/SearchAllOrderServlet?pageNow=${pl }">${pl }</a></li>
					</c:forEach> 
					
					<li><a href="${pageContext.request.contextPath}/SearchAllOrderServlet?pageNow=${pageModel.currentPage>=pageModel.pageCount?pageModel.pageCount:pageModel.currentPage+1}" id="nextPage">下一页</a></li>
					</c:if>
					</ul>
				</ul>
			 </div>
		
	</div>
</div>
<div id="footer">
	Copyright &copy; 2016 上海海文 All Rights Reserved.
</div>
</body>
</html>